/*!
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
/*
Ext.onReady(function(){

    Ext.QuickTips.init();

    // turn on validation errors beside the field globally
    Ext.form.Field.prototype.msgTarget = 'side';

    //	var bd = Ext.getBody();

*/

    /*
     * ================  Form 5  =======================
     
    bd.createChild({tag: 'h2', html: 'Form 5 - ... and forms can contain TabPanel(s)'});
*/
    var material = new Ext.ux.form.FileUploadField({
        width: 400
    });

//esto es informacion que debe salir de la base de datos, por ahora para probar aparce este store    
    var fase = new Ext.data.SimpleStore({
    fields: ['id', 'fase'],
    data : [['1','fase1'],['2','fase2']]
    });
    
    var artefacto = new Ext.data.SimpleStore({
    fields: ['id', 'artefacto'],
    data : [['1','art1'],['2','art2']]
    });
    var actividad = new Ext.data.SimpleStore({
    fields: ['id', 'actividad'],
    data : [['1','act1'],['2','act2']]
    });

    var formMaterial = new Ext.FormPanel({
        labelAlign: 'top',
        title: 'Registar Material',
        bodyStyle:'padding:5px',
        width: 400,
	       height:600,
        defaults: {width: 230},
        defaultType: 'textfield',
        items: [{
                    fieldLabel: 'Nombre Material',
                    name: 'nombreMaterial',
                    //allowBlank:false
                    },
                    material,
        {
                    xtype: 'combo',
                    name: 'fase_combo',
                    fieldLabel: 'fase',
                    mode: 'local',
                    store: fase,
                    displayField:'fase',
                    width: 200
	              },
	              {
                    xtype: 'combo',
                    name: 'artefacto_combo',
                    fieldLabel: 'artefacto',
                    mode: 'local',
                    store: fase,
                    displayField:'artefacto',
                    width: 200
                    },
	              {
                    xtype: 'combo',
                    name: 'actividad_combo',
                    fieldLabel: 'actividad',
                    mode: 'local',
                    store: fase,
                    displayField:'actividad',
                    width: 200
                    },
                  {
            		    xtype:'htmleditor',
            		    id:'descripcionMAterial',
            		    fieldLabel:'Descripcion de Material',
            		    height:200,
            		    anchor:'98%'
                }
	              
                ],
                buttons: [{
            text: 'Guardar'
        },{
            text: 'Cancelar'
        }]
            }   );
/*
    formMaterial.render(document.body);
});
*/